package com.whu.MenuHub.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.whu.MenuHub.domain.Food;
import com.whu.MenuHub.domain.FoodDTO;
import com.whu.MenuHub.exception.MenuHubException;

import java.util.List;
import java.util.Map;

public interface FoodService extends IService<Food> {
    public Food getFoodByFoodID(Integer id);
    public Food insertFood(FoodDTO foodDto) throws MenuHubException;
    public void updateFoodByID(FoodDTO foodDTO)throws MenuHubException;
    public void deleteFoodByID(Integer id)throws MenuHubException;
    public IPage<Food> findFoods(Map<String, Object> condition, Integer pageNum, Integer pageSize);

    public List<Food> getAllFood();
    List<Food> getHotFoodWithin7Day();

    public List<Food> findAllFood(Map<String, Object> condition);
    public Food findFoodByFoodName(String foodName);
}
